#include <stdio.h>
#include <stdlib.h>

typedef struct Node{
    int data;
    struct Node* next;
}Node , *PNode;


void Insert_tail (int x , PNode* p)
{
    

    PNode temp1 = (PNode)malloc(sizeof(Node));
    temp1->data = x;

    if ((*p) == NULL)
    {
        (*p) = temp1;
        return;
    }
    PNode temp2 = *p;
    while (temp2->next != NULL)
    {
        temp2 = temp2->next;
    }
    temp2->next = temp1;
    temp1->next = NULL;
}

void Print (PNode* temp)
{
    while (*temp != NULL)
    {
        if ((*temp)->next != NULL)
        {
            printf ("%d " , (*temp)->data);
        }
        else
        {
            printf ("%d" , (*temp)->data);
        }
        *temp = (*temp)->next;
    }
}

void Delete (PNode *Plist,int n)
{
    PNode temp1 = (*Plist);

    if (n==1)
    {
        (*Plist) = temp1->next;
        free(temp1);
        return;
    }
    
    for (int i = 0 ; i < n-2 ; i++)
    {
        temp1 = temp1->next;
    }
    
    PNode temp2 = temp1->next;
    temp1->next = temp1->next->next;
    free(temp2);

}

int Search (PNode* p , int s)
{
    int cnt = 0;
    PNode head = (*p);
    while (head != NULL)
    {
        if (head->data == s)
        {
            return cnt + 1;
        }
        head = head->next;
        cnt++;
    }
}


int main ()
{
    PNode headA , headB , headC;
    headA = NULL;
    headB = NULL;
    headC = NULL;

    int m , n , p;
    scanf ("%d%d%d" , &m , &n , &p);

    for (int i = 0 ; i < m ; i++)
    {
        int tem1;
        scanf ("%d" , &tem1);
        Insert_tail (tem1 ,&headA );
    }

    for (int i = 0 ; i < n ; i++)
    {
        int tem2;
        scanf ("%d" , &tem2);
        Insert_tail (tem2 ,&headB );
    }

    for (int i = 0 ; i < p ; i++)
    {
        int tem3;
        scanf ("%d" , &tem3);
        Insert_tail (tem3 ,&headC );
    }//create and init

    int flag = 0;
    int pos = 0;

    PNode A , B , C;
    A = headA;
    B = headB;
    C = headC;

    while (B != NULL)
    {
        while (C != NULL)
        {
            if (B->data == C->data)
            {
                flag = B->data;
                pos = Search(&headA , flag);
                if (pos != 0)
                {
                    Delete(&headA , pos);
                }
            }
            C = C->next;
        }
        C = headC;
        B = B->next;
    }

    
    
  
    Print (&headA);
    
    return 0;
}